using System;
using System.Collections.Generic;

namespace View.Replay.Application
{
	public class PersistentObject
	{
		public string Name
		{
			get;
			set;
		}
		public string GroupName
		{
			get;
			set;
		}
		public Variable Value
		{
			get;
			set;
		}
		public Variable DefaultValue
		{
			get;
			set;
		}
		public Variable MaxValue
		{
			get;
			set;
		}
		public Variable MinValue
		{
			get;
			set;
		}
		public bool IsSave
		{
			get;
			set;
		}
		public ParameterRight Rights
		{
			get;
			set;
		}
		public List<Variable> OptionList
		{
			get;
			set;
		}
		public string Description
		{
			get;
			set;
		}
		public PersistentObject(object val, bool isSave)
		{
			this.Value = ((val == null) ? Variable.Invalid : new Variable(val));
			this.IsSave = isSave;
		}
		public PersistentObject() : this(null, false)
		{
		}
		public override string ToString()
		{
			return string.Format("{0}.{1} = {2}", this.GroupName, this.Name, this.Value);
		}
	}
}
